/*

Nicole Yadon	
Proposal title: The Politics of Skin Color: Skin Color as a Politicized Identity for African Americans

From proposal:

HYPOTHESES

Stated-Hyp1: When viewing a message regarding skin color inequities and remedies, 
	the interaction of skin color and skin color identity will result 
	in those with high levels of skin tone identity—but at opposite ends of the 
	color spectrum—to exhibit the largest differences in support for political 
	remedies to color-based inequities (e.g., dark- vs. light-skinned 
	high-identifiers).
	
	Test-Hyp1: Seeing a message about skin color inequities+remedies vs. race-based inequities+remedies will increase support for political remedies based on skin-color among those with darker-skin-color interacted with stronger skin-color identity (compared to those with lighter skin-color and/or weaker skin-color identity)


Stated-Hyp2: those with high levels of skin tone identity—regardless of skin tone 
	—may be most willing to acknowledge colorism and thus most supportive of 
	political remedies to color-based inequities relative to low-identifiers,
	who will be the least supportive (i.e., high- vs. low-identifiers).
	
	Test-Hyp2: The effect of skintone identity on support for policies supporting remedies for skintone-based inequities will be mediated by acknowledgement of color-based inequities. 
	
	
********************************************************************************
NOTES

- for hypothesis 2, no treatment is needed. We ran this analysis on the entire 
sample. 
*/

clear all
use "Yadon1053.dta", clear

********************************************************************************

* INDICATORS OF EXPERIMENTAL MANIPULATION

	* Labels of treatment are in the proporal
	tab DOV_T32
	lab def treat 1 "threat: -class/race" 2 "threat: -race/skin" ///
	3 "threat+opp: - class/race" 4 "threat+opp: - race/skin" 5 "control"
	gen treat=DOV_T32
	lab val treat treat
	tab treat
	
	* create indicator of threat+opp treatment for race vs. skincolor
	gen threatopp_skin = 1 if treat==4
	replace threatopp_skin = 0 if treat==3
	lab def skinrace 1 "Skincolor-based threat/opp" 0 "Race-based threat/opp"
	lab val threatopp_skin skinrace
	tab threatopp_skin treat

	
* MODERATORS

* skin color, actual
	/* From quex:
	- compared to hand on screen, which tone comes closest to R's skin color
	- hand 1 is the lightest, and hand 10 the darkest
	*/
	clonevar color_actual = Q1
	replace color_actual=. if Q1>10
	tab color_actual, mis
	
* skin color identity
	* From quex: How important is your skin tone to your identity?
	
	// note: variable is reverse-coded
	recode Q3 (1=5) (2=4) (3=3) (4=2) (5=1) (*=.), gen(color_id)
	lab def id 1 "not imp at all" 2 "a little imp" 3 "moderately imp" 4 "very imp" 5 "extremely imp"
	lab val color_id id
	tab color_id, mis
	
*******************************
* OUTCOMES
		
* 1) support for political remedies of color-based inequities

*Do you favor or oppose allowing companies to increase the number of darker-skinned Black workers by considering skin tone along with other factors when choosing employees?

		// reverse coded, need to correct
	lab def support 1 "oppose a great deal" 7 "support a great deal"
	recode Q7_1 (7=1) (6=2) (5=3) (4=4) (3=5) (2=6) (1=7) (*=.), gen(support_affact)
	lab val support_affact support
	tab support_affact, mis

******************************************
* MEDIATORS

* acknowledgement of colorism

	/* 5 items (please see quex)
[Black people with lighter skin are given better employment opportunities in our society than those with darker skin.] Next, please tell us how often you believe the following statements are true.

[Black people with darker skin receive harsher treatment by police compared to those with lighter skin.] Next, please tell us how often you believe the following statements are true.

[Black people with lighter skin are treated better than those with darker skin by White people in our society.] Next, please tell us how often you believe the following statements are true.

[Skin tone plays a part in determining how far someone can make it in society.] Next, please tell us how often you believe the following statements are true.

[Focusing on issues related to racial discrimination will automatically resolve any issues related to skin tone discrimination. ] Next, please tell us how often you believe the following statements are true.

	*/

	// recode missing
	forval i=1/5 {
		replace Q9_`i'=. if Q9_`i'==98
		tab Q9_`i'
	}
	
	// recode so that higher values indicate acknowledgement of colorism	
	lab def colorism 1 "no acknoledgement" 5 "full acknoledgement"
	
	forval i=1/5 {
		replace Q9_`i'=6-Q9_`i' if Q9_`i'!=.
		lab val Q9_`i' colorism
		tab Q9_`i'
	}
	
	gen colorism_acknowledged =Q9_1 + Q9_2 + Q9_3 +Q9_4 +Q9_5
	tab colorism_acknowledged
	

	

********************************************************************************

* ANALYSIS
	
*Test-Hyp1: Seeing a message about skin color inequities+remedies vs. race-based inequities+remedies will increase support for political remedies based on skin-color among those with darker-skin-color interacted with stronger skin-color identity (compared to those with lighter skin-color and/or weaker skin-color identity)
	
	* we are comparing the coefficient of threatopp_skin* skincolor* skin color identity
	
	reg support_affact i.threatopp_skin##c.color_actual##c.color_id
	// reject. p= 0.649
	tess 1.threatopp_skin#c.color_actual#c.color_id +, init(Yadon1053)
	
*Test-Hyp2: The effect of skintone identity on support for policies supporting remedies for skintone-based inequities will be mediated by acknowledgement of color-based inequities. 

	reg support_affact color_id
	est sto m1
	
	reg support_affact color_id colorism_acknowledged
	est sto m2
	
	suest m1 m2
	

	test [m1_mean]color_id=[m2_mean]color_id
	
	// do not reject. p= 0.0001

	tess, mediation
